//
//  BMSDeviceInfo.m
//  WDBMS
//
//  Created by YeJary on 2025/5/12.
//

#import "BMSDeviceInfo.h"
#import "BMSKeychain.h"

@interface BMSDeviceInfo ()

@property (nonatomic, copy, readwrite, nullable) NSString *idfa;
@property (nonatomic, copy, readwrite) NSString *idfv;
@end

@implementation BMSDeviceInfo

+ (instancetype)shared {
    static BMSDeviceInfo *instance;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [[BMSDeviceInfo alloc] init];
    });
    return instance;
}

- (void)updateWithIDFA:(nullable NSString *)idfa idfv:(NSString *)idfv {
    self.idfa = idfa;
    self.idfv = idfv;
}

- (NSString *)UUID {
    return [BMSKeychain WDKeychainGetUUID];
}

@end

